class CreateMenus < ActiveRecord::Migration
  def self.up
    create_table :menus do |t|
      t.column "parent_id", :integer
      t.column "lft", :integer, :null => false
      t.column "rgt", :integer, :null => false
      #custom columns begins
      t.column "title", :string, :null=>false
      t.column "url", :string, :null=>false
      #custom columns ends
      t.column "lock_version", :integer, :default => 0
      t.column "created_at", :datetime, :null => false
      t.column "updated_at", :datetime, :null => false
    end
  end

  def self.down
    drop_table :menus
  end
end
